Skip to content

Remove underscore prefix from Validation class - property#325

Merged
LordSimal merged 1 commit intocakephp:6.xfrom
arshidkv12:6.x_underscore_rector
Oct 5, 2025
Merged

Remove underscore prefix from Validation class - property#325
LordSimal merged 1 commit intocakephp:6.xfrom
arshidkv12:6.x_underscore_rector

Conversation

@arshidkv12
Copy link
Copy Markdown

No description provided.


$rectorConfig->ruleWithConfiguration(RenamePropertyRector::class, [
new RenameProperty('Cake\ORM\Entity', '_accessible', 'patchable'),
new RenameProperty('Cake\Utility\Inflector', '_plural', 'plural'),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should only add rules for properties/classes which are likely to be overridden in user code, otherwise we will unnecessarily slow down the upgrade process by adding too many rules.

The likely hood of any of the classes in the PR to be overridden is very low.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with that, even though we don't really know what is more or less likels to be overwritten.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Admittedly, I am not sure how much slow down would be there if we added rules for all the properties/methods we are changing. So perhaps we can add them all for now, since they are usually one liners, and remove later if needed.

@LordSimal LordSimal force-pushed the 6.x_underscore_rector branch from e3c28df to 89c9b90 Compare October 5, 2025 12:48
@LordSimal LordSimal merged commit 819f2a2 into cakephp:6.x Oct 5, 2025
5 checks passed
LordSimal pushed a commit that referenced this pull request Jan 6, 2026
Co-authored-by: Arshid <arshid@Arshids-MacBook-Air.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants